<?php
//随机生成4位字符
function getname($length=4){
	$chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
	$filename='';
	for($i=0;$i<$length;$i++){
		$filename .= $chars[(mt_rand(0, strlen($chars)-1))];
	}
	return $filename;
}
//echo getname();
for($j=0;$j<10;$j++){
	echo htmlentities('<span id="'.getname().'">'.getname().'</span>');
	echo "<br>";
}
?>